#!/usr/bin/env python
#coding=utf8

from former_project import models

class Hotnews(models.Model):
    '''新闻列表'''
    news_type          = models.IntegerField('新闻类型', max_length=11, db_index=True, default=False)
    global_key         = models.CharField('新闻唯一键值,标题的md5', max_length=50, unique=True)
    priority           = models.IntegerField('评论显示的优先级', max_length=11, default=50, db_index=True, null=True)
    status             = models.IntegerField('新闻状态', max_length=11, default=1, db_index=True, null=True)
    isvalid            = models.BooleanField('记录有效性', default=True, db_index=True, null=True)
    isglobal           = models.BooleanField('该新闻是否设置为全局新闻', default=False, db_index=True, null=True)
    istop              = models.BooleanField('该新闻是否置顶', default=False, db_index=True, null=True)
    ishighlight        = models.BooleanField('是否高亮', default=False, null=True)
    ishot              = models.BooleanField('是否热帖', default=False, null=True)
    isvisible          = models.BooleanField('是否可见', default=False, null=True)
    pageview_count     = models.IntegerField('该新闻访问量', max_length=11, default=0, null=True)
    news_from          = models.CharField('新闻的来源', max_length=50,null=True)
    news_title         = models.CharField('新闻标题',max_length=200, null=True)
    news_link          = models.CharField('新闻链接',max_length=500, null=True)
    brief_description  = models.CharField('特别说明',max_length=500, null=True)
    description        = models.TextField('新闻描述', null=True)
    news_created_time  = models.DateTimeField('新闻创建时间', db_index=True, null=True)
    creator            = models.CharField('新闻创建者', max_length=50)
    created_time       = models.DateTimeField('记录创建时间', db_index=True)
    updater            = models.CharField('新闻更新者', max_length=50)
    updated_time       = models.DateTimeField('更新时间', db_index=True)
    
    class Meta:
        db_table = 'hotnews'
